﻿using QG.JobBack.Core;
using QH.JobBack.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace QG.JobBack.BLL.Service
{
    public interface IModuleService
    {

        /// <summary>
        /// 添加一个组
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        ResponseResult AddModule(Module module);
        
        /// <summary>
        /// 修改一个组
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        ResponseResult UpdateModule(Module module);


        /// <summary>
        /// 查询组列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        ResponseResult GetModuleList(int page, int limit, string moduleName);

        /// <summary>
        /// 根据ID删除一个组
        /// </summary>
        /// <param name="module"></param>
        /// <returns></returns>
        ResponseResult DeleteModuleById(int id);

        /// <summary>
        /// 查询单个实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResponseResult GetModule(int id);
        /// <summary>
        /// 查询父级所有组
        /// </summary>
        /// <returns></returns>
        ResponseResult GetParentModule();

        /// <summary>
        /// 修改组的状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        ResponseResult UpdateStatus(int id, bool status);

        /// <summary>
        /// 查询所有组
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResponseResult GetModules();
    }
}
